package com.jichangxiu.generator.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jichangxiu.common.entity.po.BaseEntity;
import com.jichangxiu.generator.entity.bo.GenTemplateBo;
import com.jichangxiu.generator.entity.vo.GenTemplateVo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * GenTemplate: gen_template 生成模板表
 *
 * @author JiChangXiu
 * @create 2024-06-30 13:31:07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("gen_template")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AutoMappers({
        @AutoMapper(target = GenTemplateBo.class, reverseConvertGenerate = false),
        @AutoMapper(target = GenTemplateVo.class, reverseConvertGenerate = false)
})
public class GenTemplate extends BaseEntity {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 编码
     */
    @TableField(value = "no")
    private String no;

    /**
     * 标识
     */
    @TableField(value = "code")
    private String code;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 模板类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 模板分类
     */
    @TableField(value = "category")
    private String category;

    /**
     * 模板内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 分类ID
     */
    @TableField(value = "category_id")
    private String categoryId;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 顺序
     */
    @TableField(value = "sort")
    private BigDecimal sort;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 是否启用
     */
    @TableField(value = "enabled")
    private Integer enabled;

    /**
     * 启用者
     */
    @TableField(value = "enabled_by")
    private String enabledBy;

    /**
     * 启用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "enabled_time")
    private Date enabledTime;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Long deleted;

}